<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script type="text/javascript">
			function show(){
				var today=new Date()
				var  year=today.getFullYear() 
				var month=format(today.getMonth()+1) 
				var date=format(today.getDate()) 
				var hour=format(today.getHours()) 
				var min=format(today.getMinutes()) 
				var seconds=format(today.getSeconds()) 
				var day=""
				switch(today.getDay()){
					case 0: day="星期天"; break;
					case 1: day="星期一"; break;
					case 2: day="星期二"; break;
					case 3: day="星期三"; break;
					case 4: day="星期四"; break;
					case 5: day="星期五"; break;
					case 6: day="星期六"; break;
				}
				var str=`${year}-${month}-${date} ${hour}:${min}:${seconds} ${day}`
				document.querySelector("h1").innerHTML=str
				
				
			}
			function format(num){
				return num<10?("0"+num):num
			}
		</script>
	</head>
	<body>
		<h1></h1>
		<script type="text/javascript">
			setInterval(show,1000)
		</script>
	</body>
</html>
